import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;


public class Planet {
	private int x, y;
	private int radius;
	private Color color = Color.blue;
	private int number;
	public void paint(Graphics2D g) {
		g.setColor(color);
		g.drawOval(x-radius, y-radius, radius*2, radius*2);
		FontMetrics fm = g.getFontMetrics();
		Rectangle2D r = fm.getStringBounds(Integer.toString(number), g);
		g.drawString(Integer.toString(number), x-(int)r.getWidth()/2, y+(int)r.getHeight()/2);
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public int getRadius() {
		return radius;
	}
	public void setRadius(int radius) {
		this.radius = radius;
	}
	public Color getColor() {
		return color;
	}
	public void setColor(Color color) {
		this.color = color;
	}
	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	
}
